import { DotLoading } from 'antd-mobile'

interface Props {
    /** 是否还有更多 */
    hasMore: boolean
    /** 无更多数据提示 */
    tips?: string
}

export const MoreLoader = (props: Props) => {
    const { hasMore, tips = `~ 人家也是有底的 ~` } = props

    return (
        <>
            {hasMore ? (
                <>
                    <span>Loading</span>
                    <DotLoading />
                </>
            ) : (
                <span>{tips}</span>
            )}
        </>
    )
}

export default MoreLoader
